<?php
/*
 * @Author: your name
 * @Date: 2021-11-02 20:43:06
 * @LastEditTime: 2021-12-30 14:45:51
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \property\bootstrap\app.php
 */

/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/




$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
// defined('__URL__') OR define('__URL__',($_SERVER['REQUEST_SCHEME']??'http')."://". $_SERVER['HTTP_HOST']);
// defined('__PATH__') OR define('__PATH__',$_SERVER['DOCUMENT_ROOT']);

// defined('__WXAPPID__') OR define('__WXAPPID__',"wx1c67e8d3d73b32f4");                          //微信小程序APPID
// defined('__WXAPPSECRET__') OR define('__WXAPPSECRET__',"77562730b1d858f10a5179d15c232116");    //微信小程序APPSecret

// defined('__TTAPPID__') OR define('__TTAPPID__',"tt065570e8996cd87401");                                //头条小程序APPID
// defined('__TTAPPSECRET__') OR define('__TTAPPSECRET__',"9425226f3d39c2ea53950a33eba23fba3e3b914e");    //头条小程序APPSecret


// defined('SHOP_LOGIN_REDIS_KEY') OR define('SHOP_LOGIN_REDIS_KEY',env("SHOP_LOGIN_REDIS_KEY"));    //头条小程序APPSecret



/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/

$app->singleton(
    Illuminate\Contracts\Http\Kernel::class,
    App\Http\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Console\Kernel::class,
    App\Console\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    App\Exceptions\Handler::class
);

/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/

return $app;
